module.exports = opt => {
	return async (req, res, next) => {
		const modelName = require('inflection').classify(req.params.resource);
		req.Model = require(`../Models/${modelName}`);
		next();
	};
};
